<% if @cultural_heritage_transfers.size > 0 %>
  <br />
  <table class="paginated_table sorted_table">

    <thead>
      <th>Codigo de traslado</th>
      <th>Origen</th>
      <th>Destino</th>
      <th>Fecha de Modificación</th>
      <th>Estado</th>
      <th></th>
      <th></th>
      <th></th>
    </thead>
    <tbody>
    <% @cultural_heritage_transfers.each do |cultural_heritage_transfer| %>
      <tr>
        <td><%= cultural_heritage_transfer.id %></td>
        <td><%= cultural_heritage_transfer.obj_cultural_institution_origin.name %></td>
        <td><%= cultural_heritage_transfer.obj_cultural_institution_destiny.name%></td>
        <td><%= cultural_heritage_transfer.updated_at %></td>
        <td><%= cultural_heritage_transfer.str_state %></td>
        <% if cultural_heritage_transfer.state==0 %>
          <td>
            <%= link_to image_tag("navi/wire_transfer_24.png", :border => 0, :title => 'Iniciar Traslado'), {:action => 'transfer_state',:id => cultural_heritage_transfer.id}, {:confirm => 'Esta seguro?'}%>
          </td>
        <%end%>
        <% if cultural_heritage_transfer.state==1 %>
          <td>
            <%= link_to image_tag("navi/wire_transfer_24.png", :border => 0, :title => 'Finalizar traslado'), {:action => 'finalize_state',:id => cultural_heritage_transfer.id}, {:confirm => 'Esta seguro?'}%>
          </td>
        <%end%>
        <% if cultural_heritage_transfer.state==2 %>
          <td>
          </td>
        <%end%>

        <td><%= link_to image_tag("navi/search-16-ns.png", :border => 0, :title => 'Mostrar'), cultural_heritage_transfer %></td>
        <td><%= link_to image_tag("navi/cross-16-ns.png", :border => 0, :title => 'Eliminar'), cultural_heritage_transfer, :confirm => 'Esta Seguro?', :method => :delete %></td>
      </tr>
    <% end %>
      </tbody>
  </table>
<% else %>
  <p>Ningún traslado encontrado</p>

<% end %>